package view;

import java.awt.Dimension;
import java.awt.SystemColor;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

/**
 * @uthor BWH
 */

public class LeftPanel extends JPanel {
	JButton btnRedigerPatient;
	JButton btnSletPatient;
	JButton btnVisJournal;
	JButton btnGemJournal;
	JButton btnPatientOversigt;
	JButton btnKalender;
	JButton btnOpretPatient;
	private final JButton btnSgPatienter;
	private final JButton btnAdmin;
	private final JButton btnLogUd;
	JButton btnTilbage;

	public LeftPanel(TeraFootMain teraFootMain) {
		setBackground(SystemColor.textHighlight);
		this.setPreferredSize(new Dimension(150, 500));

		btnOpretPatient = new JButton("Opret patient");
		btnOpretPatient.setBounds(10, 39, 130, 23);
		btnOpretPatient
				.setToolTipText("Tryk p\u00E5 denne knap for at oprette en ny patient i systemet.");
		btnOpretPatient.setActionCommand("OpretPatient");
		btnOpretPatient.addActionListener(teraFootMain.getAcListener());
		btnOpretPatient.setVisible(false);

		btnKalender = new JButton("Kalender");
		btnKalender.setBounds(10, 5, 130, 23);
		btnKalender
				.setToolTipText("Tryk her, for at f\u00E5 vist vinduet med kalenderen, hvor der kan laves tidsbestillinger.");
		btnKalender.setActionCommand("Kalender");
		btnKalender.addActionListener(teraFootMain.getAcListener());
		btnKalender.setVisible(false);
		setLayout(null);
		add(btnKalender);
		add(btnOpretPatient);

		btnPatientOversigt = new JButton("Patient oversigt");
		btnPatientOversigt.setBounds(10, 73, 130, 23);
		btnPatientOversigt
				.setToolTipText("En oversigt over alle patienterne i databasen");
		btnPatientOversigt.setActionCommand("PatientOversigt");
		btnPatientOversigt.addActionListener(teraFootMain.getAcListener());
		btnPatientOversigt.setVisible(false);
		add(btnPatientOversigt);

		btnRedigerPatient = new JButton("Rediger patient");
		btnRedigerPatient.setBounds(10, 149, 130, 23);
		btnRedigerPatient.setHorizontalAlignment(SwingConstants.LEFT);
		btnRedigerPatient.setVisible(false);
		btnRedigerPatient.setActionCommand("Rediger patient");
		btnRedigerPatient.addActionListener(teraFootMain.getAcListener());

		btnSgPatienter = new JButton("S\u00F8g patienter");
		btnSgPatienter.setBounds(10, 111, 130, 23);
		btnSgPatienter.setVisible(false);
		btnSgPatienter.setActionCommand("Search patient");
		btnSgPatienter.addActionListener(teraFootMain.getAcListener());
		add(btnSgPatienter);
		add(btnRedigerPatient);

		btnSletPatient = new JButton("Slet patient");
		btnSletPatient.setBounds(10, 183, 130, 23);
		btnSletPatient.setVisible(false);
		btnSletPatient.setActionCommand("Slet patient");
		btnSletPatient.addActionListener(teraFootMain.getAcListener());
		add(btnSletPatient);

		btnVisJournal = new JButton("Vis journal");
		btnVisJournal.setBounds(9, 217, 131, 23);
		btnVisJournal.setVisible(false);
		btnVisJournal.setActionCommand("Vis journal");
		btnVisJournal.addActionListener(teraFootMain.getAcListener());
		add(btnVisJournal);

		btnGemJournal = new JButton("Gem journal");
		btnGemJournal.setBounds(10, 39, 130, 23);
		btnGemJournal.setVisible(false);
		btnGemJournal.setActionCommand("Gem journal");
		btnGemJournal.addActionListener(teraFootMain.getAcListener());
		add(btnGemJournal);

		btnAdmin = new JButton("Admin");
		btnAdmin.setActionCommand("AdminGUI");
		btnAdmin.addActionListener(teraFootMain.getAcListener());
		btnAdmin.setVisible(false);
		btnAdmin.setBounds(10, 351, 130, 23);
		add(btnAdmin);

		btnLogUd = new JButton("Log ud");
		btnLogUd.setActionCommand("LogUd");
		btnLogUd.addActionListener(teraFootMain.getAcListener());
		btnLogUd.setBounds(10, 386, 130, 23);
		btnLogUd.setVisible(false);
		add(btnLogUd);

		btnTilbage = new JButton("Tilbage");
		btnTilbage.setActionCommand("tilbage");
		btnTilbage.setVisible(false);
		btnTilbage.addActionListener(teraFootMain.getAcListener());
		btnTilbage.setBounds(10, 5, 130, 23);
		add(btnTilbage);
	}

	public JButton getBtnRedigerPatient() {
		return btnRedigerPatient;
	}

	public void setBtnRedigerPatient(JButton btnRedigerPatient) {
		this.btnRedigerPatient = btnRedigerPatient;
	}

	public JButton getBtnSletPatient() {
		return btnSletPatient;
	}

	public void setBtnSletPatient(JButton btnSletPatient) {
		this.btnSletPatient = btnSletPatient;
	}

	public JButton getBtnVisJournal() {
		return btnVisJournal;
	}

	public void setBtnVisJournal(JButton btnVisJournal) {
		this.btnVisJournal = btnVisJournal;
	}

	public JButton getBtnGemJournal() {
		return btnGemJournal;
	}

	public JButton getBtnSgPatienter() {
		return btnSgPatienter;
	}

	public JButton getBtnAdmin() {
		return btnAdmin;
	}

	public JButton getBtnLogUd() {
		return btnLogUd;
	}

	public JButton getBtnPatientOversigt() {
		return btnPatientOversigt;
	}

	public JButton getBtnKalender() {
		return btnKalender;
	}

	public JButton getBtnOpretPatient() {
		return btnOpretPatient;
	}

	public JButton getBtnTilbage() {
		return btnTilbage;
	}

}
